﻿/**
 * @author sminutoli
 * version 1.0
 * resuelve un tooltip si lo linkeas a algún lado
 * necesita que exista un mcRectTip si es que se quiere que haya un fondo
 */
class com.dinmax.flash.draw.cabeza.ToolTipCabeza
extends MovieClip {
	
	private var tooltipMsg:String;
	private var txt_toolTip:TextField;
	private var mcRectTip:MovieClip;
	
	function onLoad(){
		//trace("ToolTipCabeza.as | onLoad()");
		this.setToolTip(this.getTooltipMsg());
		this.stop();
				
	};
		
	public function setToolTip(msg:String):Void{
		
		this.txt_toolTip.multiline = false;
		this.txt_toolTip.wordWrap = false;
		this.txt_toolTip.autoSize="left";
		this.txt_toolTip.selectable=false;
		
		this.txt_toolTip.text=msg;
		this.mcRectTip._width=txt_toolTip._width + 10;
		this.mcRectTip._height=txt_toolTip._height;
								
	};
			
	public function remove():Void {
		com.dinmax.flash.utilities.movieclip.MovieClipUtils.destroyClip(this);
	};
		
	public function getTooltipMsg():String {
		return tooltipMsg;
	}

	public function setTooltipMsg(tooltipMsg:String):Void {
		this.tooltipMsg = tooltipMsg;
	}

}